package mingling;
//创建一个关机命令
public class ShutdownCommand implements Command {//关机命令
    private Receiver receiver;//接受者
    public ShutdownCommand(Receiver receiver) {
        this.receiver = receiver;
    }
    @Override
    public void execute() {
        System.out.println("命令角色执行关机命令");
        receiver.action();//接受者 执行动作
    }
}
